/**
 * @author uangbo
 * TODO// N/A
 */
package com.platform.manager.bo;

import java.util.ArrayList;
import java.util.List;

import com.platform.dao.BaseDao;
import com.platform.pojo.UserInfo;

public class LoginBo {

	/**
	 * 根据帐号密码查询用户
	 * @param username
	 * @param passwd
	 * @return
	 */
	public UserInfo queryUser(String username, String passwd) {
		StringBuffer hql = new StringBuffer();
		hql.append("from UserInfo t where t.loginName='").append(username)
				.append("' and t.loginPasswd='").append(passwd).append("'");
		return (UserInfo) BaseDao.getUniqueResult(hql.toString());
	}
	
	public boolean updateUserInfo(UserInfo user) {
		return BaseDao.update(user);
	}
}
